<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<include file="Public:meta" />
</head>
<body id="main_page">
<include file="Public:position" />
<div class="container">
    <form enctype="multipart/form-data" id="frm"  method="post">
        <div class="table">
            <div class="toolbars">
                <li class="toolbar"><a id="btnSaveAll" href="{$Url}Add"  title="添加专题" target="_self">添 加 专 题</a></li>
                <li class="toolbar"><a id="btnSave" onclick="saveAll()"  title="保存所有修改">保存所有修改</a></li>
            </div>
            <table class="datatable" id="datatable">
                <tr>
                    <th width="45"  nowrap="nowrap">专题ID</th>
                    <th width="160" nowrap="nowrap">专题名称</th>
                    <th width="60" >专题排序</th>
                    <th width="150">专题图片</th>
                    
                    <th width="90">专题信息数</th>
                    <th>专题描述</th>
                    <th width="60" >属性</th>
                    <th width="150">操作</th>
                </tr>
                <notempty name="Data">  
                    <volist name="Data" id="d">
                        <tr>
                            <td>{$d.SpecialID}<input type="hidden" name="SpecialID[]" value="{$d.SpecialID}" /></td>
                            <td><input type="text" class='textinput' style="width:150px" name="SpecialName[]" value="{$d.SpecialName}" /></td>
                            <td><input type="text" class='textinput'  onclick="this.select()" style="width:50px" name="SpecialOrder[]" value="{$d.SpecialOrder}" /></td>
                            <td><notempty name="d.SpecialPicture"><img src="{$d.SpecialPicture}" style="width:146px;" /></notempty></td>
                            <td style="font-weight:bold;color:blue;">{$d.SpecialCount}</td>
                            <td style="text-align:left;">{$d.SpecialDescription}</td>
                            <td>
                                <eq name="d.IsEnable" value="1">
                                    <span style="color:#000;cursor:pointer;"  onclick="toggleStatus(this,{$d.SpecialID},'special')">启用</span>
                                <else/>
                                    <span style="color:#F00;cursor:pointer;"  onclick="toggleStatus(this,{$d.SpecialID},'special')">禁用</span>
                                </eq>
                            </td>
                            <td class="operator">
                                <a style="float:left" href="{$Url}Modify/id/{$d.SpecialID}" id="btnEdit">修改</a>
                                <eq name="d.SpecialCount" value="0">
                                    <div class="btn-sep"></div>
                                    <a style="float:left" onclick="del({$d.SpecialID})" class="btnDel">删除</a>
                                </eq>
                            </td>
                        </tr>
                    </volist>
                <else/>
                    <tr><td colspan="8" id="NoData">{$Think.lang.NoDataTip}</td></tr>
                </notempty>                                  
            </table>
            <div class="tfoot">
                  <div id="notice">
                        <b>说明：</b><span class="notice-item">专题用于已有分类的信息再次分类</span>
                   </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>
<script type="text/javascript">
function del(id){
	$.confirm("{$Think.lang.DeleteTip}", function () {
		url = "{$Url}del?id="+id;
		location.href = url;
	}, function () {
		return true;
	});
}

//保存所有修改
function saveAll(){
	$.confirm("确定保存所有修改吗？", function () {
		$('#frm').attr("action", "{$Url}saveAll");
		$('#frm').submit();
	}, function () {
		return true;
	});
}	
</script>